﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

 

public partial class Frame_UserCompany : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.companyidValue.Value= Request.QueryString["companyid"].ToString();
            this.GetData();

        }
    }

    /// <summary>
    /// 获取数据
    /// </summary>
    private void GetData()
    {
        //UserBL bl = new UserBL();

        //List<UserTable> query = bl.GetCompanyUserInfo(this.companyidValue.Value);
        //this.grdUser.DataSource = query;
        //grdUser.DataBind();
    }
   
    /// <summary>
    /// 刷新
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnRefresh_Click(object sender, EventArgs e)
    {
        this.GetData();
    }
    /// <summary>
    /// 修改
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void edit_Click(object sender, EventArgs e)
    {
        LinkButton linkBtn = sender as LinkButton;
        Response.Redirect("UserCompanyEdit.aspx?userid=" + linkBtn.CommandArgument.ToString() + "&companyid=" + this.companyidValue.Value);
    }

    /// <summary>
    /// 增加
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        Response.Redirect("UserCompanyEdit.aspx?companyid="+this.companyidValue.Value);
    }

    /// <summary>
    /// 冻结
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void remove_Click(object sender, EventArgs e)
    {
        //ModuleBL moduleBL = new ModuleBL();
        //LinkButton linkBtn = sender as LinkButton;
        //moduleBL.removeUser(linkBtn.CommandArgument.ToString());
        //this.GetData();
    }
    /// <summary>
    /// 返回
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnCancel_Click(object sender, EventArgs e)
    {
        Response.Redirect("Company.aspx");
    }

}